import { Controller, Get } from '@nestjs/common';
import { AppMapping } from './app.mapping';

@Controller()
export class AppController {
  constructor(private readonly appMapping: AppMapping) { }

  @Get('/selectAllUser')
  async selectAllUser() {
    return this.appMapping.selectAllUser()
  }

  @Get('/selectUserById')
  async selectUserById() {
    return this.appMapping.selectUserById(1)
  }

  @Get('/selectUserById2')
  async selectUserById2() {
    return this.appMapping.selectUserById2({ userId: 1, userName: '轩小浅', password: '123456' })
  }

  @Get('/selectResultUser')
  async selectResultUser() {
    return this.appMapping.selectResultUser()
  }
}
